﻿<h3>Data Templated Table No Content Example</h3>
<BSDataTable Items="Samples" Context="sample" IsResponsive="true" IsStriped="true">
    <HeaderTemplate>
        <tr>
            <th scope="col">#</th>
            <th scope="col">First</th>
            <th scope="col">Last</th>
            <th scope="col">Handle</th>
        </tr>
    </HeaderTemplate>
    <NoDataTemplate>
        <td colspan="4">No Data Available</td>
    </NoDataTemplate>
    <ItemTemplate>
        <th scope="row">@sample.Id</th>
        <td>@sample.FirstName</td>
        <td>@sample.LastName</td>
        <td>@sample.Handle</td>
    </ItemTemplate>
</BSDataTable>

@code
{
    public List<SampleData>Samples { get; set; }

    protected override void OnInitialized()
    {
        // Samples has not been intialized and will remain null
        // This causes the loading template to always show
    }
}
